// 二维数组: 相当于ES8中的Object.entries的逆运算
// Object.entries: 将对象转换成一个二维数组
// Object.fromEntries: 将二维数组转换为一个对象
const result = Object.fromEntries([
  ["name", "小陈"],
  ["age", 100],
]);
console.log(result); // { name: "小陈", age: 100 }

const m = new Map();
m.set("name", "小陈");
console.log(Object.fromEntries(m)); // { name: "小陈" }

console.log(Object.entries(result));

